﻿@using PagedList
@using PagedList.Mvc
@model IEnumerable<WhereAmiMvc.Entities.Dept>

@{
    ViewBag.Title = "部门清单";
}

<h2>部门清单</h2>

<p>
    @Html.ActionLink("新增部门", "Create")
</p>
<table class="table">
    <tr>

        <th>
            @Html.DisplayNameFor(model => model.DeptName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.DeptDiscription)
        </th>
        <th>操作</th>
    </tr>

    @foreach (var item in Model)
    {
        <tr>

            <td>
                @Html.DisplayFor(modelItem => item.DeptName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.DeptDiscription)
            </td>
            <td>
                @Html.ActionLink("✔|编辑", "Edit", new {id = item.IdDept}, new {@class = "btn btn-success"}) |
                @Html.ActionLink("ｉ|详细", "Details", new {id = item.IdDept}, new {@class = "btn btn-info"}) |
                @Html.ActionLink("✘|删除", "Delete", new {id = item.IdDept}, new {@class = "btn btn-danger"})
            </td>
        </tr>
    }

</table>

